import { request } from '@/framework/utils/request-jdz';

// 获取样本列表数据
export const ObtainSampleSata = (params) => {
  return request(
    {
      url: '/specimen/category',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

//样本类型新增
export const AddSampleSata = (params) => {
  return request(
    {
      url: '/specimen/category',
      method: 'post',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
//样本类型修改
export const SampleSataUpdate = (params) => {
  return request(
    {
      url: `/specimen/category/${params.id}`,
      method: 'put',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
//样本类型删除
export const SampleSataDelete = (id) => {
  return request(
    {
      url: `/specimen/category/${id}`,
      method: 'delete',
    },
    {
      isGetDataDirectly: false,
    },
  );
};
// 重复检查
export const checkRepeat = (params: { name?; code? }) => {
  return request(
    {
      url: '/specimen/category/distinct',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
